﻿<%@ Page Title="Registro Basico" Language="C#" MasterPageFile="~/Presentacion/Site.Master" AutoEventWireup="true" CodeBehind="RegistroBasico.aspx.cs" Inherits="Gisena.About" %>
         <%@ Import Namespace="System.Collections.Generic"%>

<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">


</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    

    <!DOCTYPE html>

<html>

<body>
 

    <ext:ResourceManager runat="server" />
    
    
  
    
    <ext:FormPanel 
        ID="FormPanPrinc" 
        runat="server"
        Title="REGISTRO DE UNIDADES PRODUCTIVAS"
        Width="600" 
        Height="800"        
        BodyPadding="10"
        DefaultAnchor="100%"
         Layout="AutoLayout"
        UI="Success">

      <%--Form Panel Principal  --%>
                

        <Items>
            
            <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Codigo Up"
                Layout="HBoxLayout">
                  <Items>
                        <ext:NumberField   ID="Txt_Cod_Up" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                        <Items>
                            <ext:Button ID="Button7" runat="server" Text="Buscar..." Icon="Zoom" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_BuscarUP_Click">
                                   <EventMask ShowMask="true" Msg="Buscando..." MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>

                  </ext:FieldContainer>

        </Items>



        <Items>

         <%--Contenedor datos basicos de la up sofia  --%>

            <ext:FieldSet 
                runat="server"
                Title="Detalle de la Up"
                DefaultAnchor="100%">
                <Defaults>
                    <ext:Parameter Name="labelWidth" Value="89" Mode="Raw" />
                </Defaults>
                <Items>
               
                      

                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Up" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nomb_UP2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

                 


                    <%-- Numero de actas sofia plus al registro ya seleccionado --%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Centro" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                      
                      <ext:TextField ID="Txt_Cod_Cent_Form2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                  
                </Items>
            </ext:FieldContainer>


             <%-- Numero de la ficha --%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="No. Ficha" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField   ID="Txt_NFicha_UP2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

   
                              
                           

                </Items>




            </ext:FieldSet>
        </Items>

        


        <Items>


         <%--Contenedor tab panel pricipal --%>
          
<ext:TabPanel runat="server" ID="TabPrinc" Width="300" Height="420" disabled="true" AutoScroll="true">
        <Items>
             <%--panel de caracterizacion UP --%>
             <ext:Panel
                runat="server" 
                Title="Caracterizacion UP" 
                 Enabled="false"
                BodyPadding="6" AutoScroll="true"
                >
                 <TabConfig runat ="server"  UI="Warning"/>
                     <Listeners>
                            <Activate Handler="#{DirectMethods}.CargarListas();" />
                 </Listeners>
                 
                <Content>

                <ext:FieldSet 
                runat="server"
                Title="Registrar Caracterizacion de la Unidad Productiva"
                Collapsible="true"
                DefaultAnchor="100%">   
                    
                    
                          
                   <Items>
             <%--Select Box del tipo de la Unidad Productiva Caracterizacion Up --%>
                    <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Tipo UP"
                                     Layout="HBoxLayout">
                <Items>
                   <ext:SelectBox
                                ID="Slb_Tp_up"
                                runat="server" 
            
                                ValueField="Id_Tp_UP"
                                DisplayField="Nombre"

                                EmptyText="Seleccione el Tipo de UP." 
                                >
                            <Store>
                                 <ext:Store runat="server" ID="StTipoUP">
                                <Model>
                                        <ext:Model runat="server">
                                        <Fields>
                                        <ext:ModelField Name="Id_Tp_UP" />
                                        <ext:ModelField Name="Nombre" />
                                    </Fields>
                                </ext:Model>
                    </Model>            
                </ext:Store>    
            </Store>    
        </ext:SelectBox>
                    
             </Items>      
                   </ext:FieldContainer>
                       </Items> 
                    
                      <%--  Text Area de la Descripcion de la Unidad Productiva Caracterizacion --%>
                  <Items>
                    <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Descripción"
                                     Layout="HBoxLayout">
                                                         <Items>                       
                                                              <ext:TextArea runat="server"   EmptyText="Digite una Descripción" ID="TxtA_Descripcion_UP" /> 
                                                          </Items>
                   </ext:FieldContainer>
                   </Items>
                    <%--  Numero de Acta de la Unidad Productiva Caracterizacion --%>
                                  <Items> 
                                     <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Numero Acta"
                                     Layout="HBoxLayout">

                                    <Items>                                            
                                            <ext:TextField ID ="Txt_Num_Act_Mat" runat="server" Width="100" Margins="0 3 0 0" Weight="25"   EmptyText="Digite el Numero de acta de entrega de materiales"  />    
                                     </Items>
                                    </ext:FieldContainer>
                   </Items>
                    <%--  Estado de la Unidad Productiva Caracterizacion --%>
                <Items>
                    <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Estado UP"
                                     Layout="HBoxLayout">

                                    <Items>
                   <ext:SelectBox
                                 ID="Sel_Id_Est_up"
                                 runat="server" 
                                 ValueField="Id_Est"
                                 DisplayField="Nombre"
                                 EmptyText="Seleccione el Estado de la UP." 
                                  >
                      
                                     <Store>
                                          <ext:Store runat="server" ID="StEstado">
                                          <Model>
                                            <ext:Model runat="server">
                                           <Fields>
                                             <ext:ModelField Name="Id_Est" />
                                             <ext:ModelField Name="Nombre" />
                                
                                         </Fields>
                          </ext:Model>
                    </Model>            
                </ext:Store>    
            </Store>    
        </ext:SelectBox>
             </Items>      

                      </ext:FieldContainer>
                 </Items> 


         <%--Boton Guardar Caracterizacion --%>
 <Items>  
             <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>
                            <ext:Button ID="Btn_Guardar_Caract" runat="server" Text="Guardar" Icon="Add" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_caract">
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                        </ext:Toolbar>

     </Items>  
        
 </ext:FieldSet>
                
                </Content>
                 
                   
               


            </ext:Panel>
             <%--panel de productos --%>
             <ext:Panel
                runat="server" 
                Title="Productos" 
                BodyPadding="6" AutoScroll="true"
                 >
                 <TabConfig runat ="server"  UI="Warning"/>
                  <Listeners>
                            <Activate Handler="#{DirectMethods}.ActivarPanelProduc();" />
                 </Listeners>
                <Content>
                            
              
                    <ext:FieldSet 
                runat="server"
                Title="Registrar productos Unidad Productiva"
                Collapsible="true"
                DefaultAnchor="100%">
              <Items>
                     <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Cod/Nomb. del Producto"
                                     Layout="HBoxLayout">


                        <Items>
 <%-- Select Box Producto linta Desplegable--%>  

                     <ext:ComboBox   ID="cmbproduct"
                runat="server" 
                DisplayField="Nomb_Prod" 
                ValueField="Id_Prod"
                TypeAhead="false"
                Width="300"
                PageSize="10"
                HideBaseTrigger="true"
                MinChars="0"
                TriggerAction="Query"
                         EmptyText="Nombre o Codigo del Producto">
                <ListConfig  LoadingText="Buscando...">
                    <ItemTpl runat="server">
                        <Html>
                            <div class="search-item">
							    <h3><span>{Id_Prod} </span>{Nomb_Prod}</h3>
							    {Descrip}
						    </div>
                        </Html>
                    </ItemTpl>
                </ListConfig>
                <Store>
                    <ext:Store runat="server" AutoLoad="false">
                        <Proxy>
                            <ext:AjaxProxy Url="Plants.ashx">
                                <ActionMethods Read="POST" />
                                <Reader>
                                    <ext:JsonReader Root="plants" TotalProperty="Id_Prod" />
                                </Reader>
                            </ext:AjaxProxy>
                        </Proxy>
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="Id_Prod" />
                                    <ext:ModelField Name="Nomb_Prod" />
                                    <ext:ModelField Name="Descrip" />
                                    <ext:ModelField Name="Id_Cate" Type="Int" />
                                    <ext:ModelField Name="Id_Tp_Prod" Type="Int" />
                                </Fields>
                            </ext:Model>                            
                        </Model>
                    </ext:Store>
                </Store>
            </ext:ComboBox>    
                            <ext:Button ID="BtnBusqCodigo" runat="server" Text="Por Codigo">
                                <DirectEvents>
                                   <Click OnEvent="Btn_BtnBusqCodigo">
                                  </Click>
                           </DirectEvents>
                            </ext:Button>
                        </Items>
  </ext:FieldContainer>

               </Items>          
         <%--Boton Guardar Producto --%>
 <Items>  
             <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>
                            <ext:Button ID="Btn_Registrar_Product" runat="server" Text="Guardar" Icon="Add" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_Prod">
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                        </ext:Toolbar>

     </Items>  

 <Items>
 
                    
                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false">                         
                    <Store>
                         <%--Data Grid Producto Ofertado --%>
                        <ext:Store ID="StrGrid_Prod_Ofer" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="Id_Prod">
                                    <Fields>
                                       
                                        <ext:ModelField Name="Id_Prod_Ofert" Type="Int" />
                                        <ext:ModelField Name="Id_Prod" Type="Int" />
                                        <ext:ModelField Name="Nomb_Prod" Type="String" />
                                        <ext:ModelField Name="Descrip" Type="String" />
                                        <ext:ModelField Name="Principal" Type="Boolean" />
                                        <ext:ModelField Name="Nom_Tp_Prod" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                             <ext:Column runat="server" 
                                Text="ID" 
                                Width="30" 
                                Sortable="true" 
                                DataIndex="Id_Prod_Ofert" 
                                />
                            <ext:Column runat="server" 
                                Text="COD_PRODUCT" 
                                Width="60" 
                                Sortable="true" 
                                DataIndex="Id_Prod" 
                                />
                            <ext:Column runat="server" 
                                Text="NOMBRE" 
                                Width="80" 
                                Sortable="true" 
                                DataIndex="Nomb_Prod"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="DESCRIPCION" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Descrip"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="ES PRINCIPAL?" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Principal"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="TIPO_PRODUCTO" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Nom_Tp_Prod"
                                Flex="1" />
                                
                           
                            <ext:Column runat="server" 
                               
                                Width="20" 
                                Sortable="true" 
                                Flex="1"   >
                             <Commands>
                             <ext:ImageCommand CommandName="Edit" Icon="Delete" Text="Borrar">
                                <ToolTip Text="Edit" />
                             </ext:ImageCommand>
                             </Commands>
                             <Listeners>
                             <Command  Handler="#{DirectMethods}.BorrarProducto(record.data.Id_Prod_Ofert);" />
                             </Listeners>
                              </ext:Column>



                        </Columns>
                    </ColumnModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Mostrando Productos {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel>
                    
                     
              </Items>




                        </ext:FieldSet>

                        
                   


                  
                             
                </Content>
            </ext:Panel>
             <%--panel de asesores--%>

            <ext:Panel 
                runat="server" 
                Title="Asesores" 
                BodyPadding="6" AutoScroll="true"
                 UI="Warning">
                <TabConfig runat ="server"  UI="Warning"/>
               
               
                <Items>
                    <ext:FieldSet 
                runat="server"
                Title="BUSCAR ASESOR DE LA UNIDAD PRODUCTIVA"
                Collapsible="true"
                DefaultAnchor="100%">
                <Defaults>
                    <ext:Parameter Name="labelWidth" Value="89" Mode="Raw" />
                </Defaults>

<Items>
 <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Identificacion"
                Layout="HBoxLayout" ID="ctl5616">
                  <Items>
                        <ext:NumberField   ID="Txt_Ident_Asesor" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />
                     
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true" ID="ctl5618">   
                       
                        <Items>
                            <ext:Button ID="Btn_Buscar_Ases" runat="server" Text="Buscar..." Icon="Zoom" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Buscar_Asesor">
                                   <EventMask ShowMask="true" Msg="Buscando en Sofia Plus" MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>
                  </ext:FieldContainer>

    </Items>





            <%-- Nombre del Asesor --%>
                <Items>

                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Asesor" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nombre_Asesor" runat="server" Width="150" Margins="0 3 0 0"   ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>

                 

                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="Email" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Correo_Asesor" runat="server" Width="150" Margins="0 3 0 0"  ReadOnly="true" />                    
                </Items>
           

            </ext:FieldContainer>



                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="Celular" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_Celular_Asesor" runat="server" MaxLeng="20"  AllowBlank="false" Width="150"   ReadOnly="true"  />                    
                </Items>
            </ext:FieldContainer>
          </Items>


             <Items>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Rol" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout"> 
             <Items>
          <ext:MultiCombo runat="server" SelectionMode="All" Width="150" ID="Id_Tp_Perfil">
            <Items>
                <ext:ListItem Text="Item 1" Value="1" />
                <ext:ListItem Text="Item 2" Value="2" />
                <ext:ListItem Text="Item 3" Value="3" />
                <ext:ListItem Text="Item 4" Value="4" />
                <ext:ListItem Text="Item 5" Value="5" />
            </Items>
            
            <SelectedItems>
                <ext:ListItem Value="2" />
                <ext:ListItem Index="4" />
            </SelectedItems>
        </ext:MultiCombo>


                    <ext:Toolbar  runat="server"   Flex="1"   Flat="true" ID="Toolbar1">   
                       
                        <Items>
                            <ext:Button ID="Btn_Actual_Rol" runat="server" Text="Actualizar Rol" Icon="ApplicationEdit" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Actualizar_Rol">
                                   <EventMask ShowMask="true" Msg="Actualizando Rol" MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>


              </Items>
         </ext:FieldContainer>   
                        
                  
                             
                     
      </Items>
        



                    </ext:FieldSet>
  
               </Items>
      
                  
                         

               <Items>

                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false">                         
                    <Store>
                        <ext:Store ID="Ste_Asesor" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="Identificacion" Type="Int" />
                                        <ext:ModelField Name="Nombre" Type="String" />
                                        <ext:ModelField Name="Tp_Doc" Type="String" />
                                        <ext:ModelField Name="Correo" Type="String" />
                                        <ext:ModelField Name="Celular" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" 
                                Text="Identificacion" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="ID" 
                                />
                            <ext:Column runat="server" 
                                Text="Nombre" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Tp_Doc" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Correo" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="Celular" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" >
                                <Renderer Handler="return (value) ? 'Yes':'No';" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Displaying Jobs {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel>


                 </Items>

                  
              
            </ext:Panel>

            <%--panel de socios --%>
        <ext:Panel
                runat="server" 
                Title="Socios" 
                BodyPadding="6" AutoScroll="true"
             >
            <TabConfig runat ="server"  UI="Warning"/>
                <Content>
                 
                    <ext:FieldSet 
                runat="server"
                Title="LISTA DE SOCIOS"
                Collapsible="FALSE"
                DefaultAnchor="100%">
                     
   <Items>
            
            <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Codigo Up"
                Layout="HBoxLayout">
                  <Items>
                        <ext:NumberField   ID="Txt_Cod_Up_Soc" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />
                     
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>
                            <ext:Button ID="Btn_Buscar_socio" runat="server" Text="Buscar..." Icon="Zoom" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Buscar_SocioUp">
                                   <EventMask ShowMask="true" Msg="Buscando..." MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>

                  </ext:FieldContainer>

        </Items>

    

 <Items>
 
                    
                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false">                         
                    <Store>
                        <ext:Store ID="Ste_Socio" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="ID" Type="Int" />
                                        <ext:ModelField Name="REGIONAL" Type="String" />
                                        <ext:ModelField Name="Nombre" Type="String" />
                                        <ext:ModelField Name="Estado" Type="String" />
                                        <ext:ModelField Name="Rol" Type="String" />
                                        <ext:ModelField Name="Telefono" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" 
                                Text="ID" 
                                Width="20" 
                                Sortable="true" 
                                DataIndex="ID" 
                                />
                            <ext:Column runat="server" 
                                Text="REGIONAL" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="REGIONAL"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Nombre" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Estado" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="Rol" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" />
                            <ext:Column runat="server" 
                                Text="Telefono" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" >
                                <Renderer Handler="return (value) ? 'Yes':'No';" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Displaying Jobs {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel>
                    
                     
              </Items>




                        </ext:FieldSet>

                </Content>
            </ext:Panel>
            
     <ext:Panel
                runat="server" 
                Title="Localización" 
                BodyPadding="6" AutoScroll="true">
         <TabConfig runat ="server"  UI="Warning"/>
                <Content>
                    </Content>
      </ext:Panel>
            
             </Items>
    

    </ext:TabPanel>
            </Items>


        
        
</ext:FormPanel>

   

     <%-- Ventana de Registro UP --%>

     
      <ext:Window 
            ID ="ventana_up"
            runat="server" 
            Width="800"
            Height="800"            
            Title="Registro de Unidadades Productivas"            
            Closable="true"
            Layout="FormLayout"
            BodyPadding="5"
          modal="true"
          hidden="true"
          UI="Warning"> 
                    
   
        <Items>


              


                <ext:FormPanel 
                    ID="FormPanel2" 
                    runat="server" 
                    Border="false" 
                    BodyStyle="background-color:transparent;"
                    
                     AnchorVertical="800"
                     AnchorWidth="800" 
                   
                    Layout="Form">
               <Items>
            
            <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Codigo Up"
                Layout="HBoxLayout">
                  <Items>
                        <ext:NumberField   ID="Txt_Cod_Up_sof" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />
                     
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>

                            <ext:Button ID="Btn_Bus_UP_Sof" runat="server" Text="Buscar..." Icon="Zoom" >
                                     <DirectEvents>
                                   <Click OnEvent="Btn_BuscarUP_Sofia"/>
                                           </DirectEvents>
                                  
                           
                         </ext:Button>

                              <ext:Button runat="server" Text="Registrar Up" ID="Btn_Guardar_Up" icon="Add">
                                 <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_Up">
                                   <EventMask ShowMask="true" Msg="Registrando Up" MinDelay="500" />
                                  </Click>
                            </DirectEvents>
                       </ext:Button>

                        </Items>



                    </ext:Toolbar>
                  </Items>
                  </ext:FieldContainer>
        
          
                   
                   
                    </Items>
             





                    <%-- Ventana emergente Registro UP --%> 
                <Items>
                <%-- Acrodion del Detalle de UP --%>   
               <ext:FieldSet 
                runat="server"
                Title="Detalle de la Up"
                Collapsible="true"
                DefaultAnchor="100%">
                <Defaults>
                    <ext:Parameter Name="labelWidth" Value="89" Mode="Raw" />
                </Defaults>
                <Items>
               

                    <%-- Codigo de la Regional sofia up--%>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Regional" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_Cod_Reg" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- Nombre de la regiona Sofia up--%>
                      <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Regional" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nombre_Reg" runat="server" Width="150" Margins="0 3 0 0" />                    
                </Items>
            </ext:FieldContainer>



                   
                <%-- Codigo del centro de Formacion sofia up--%>
         <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Centro de Formacion" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_Cod_Cent_Form" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />                    
                </Items>
            </ext:FieldContainer>


                    <%-- Nombre del Centro de Formacion sofia up--%>
                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nomb. Centro de Formacion" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nombre_Cen_For" runat="server" Width="150" Margins="0 3 0 0" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- Id_Ficha Sofia up--%>
                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="No. Ficha" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_NFicha_UP" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- Codigo sofia Up--%>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Codigo UP" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Cod_UP" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- nombre Up sofia--%>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Up" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Nomb_UP" runat="server" Width="150" Margins="0 3 0 0" />                    
                </Items>
            </ext:FieldContainer>
                    
                 <%-- fecha de creacion--%>
              
                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="Fecha Creación" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout"> 
                <Items>
                    <ext:DateField 
                    ID="DfechaCreacion" 
                    runat="server" 
                    Vtype="daterange"
                    EndDateField="Fecha Creacion"
                    EnableKeyEvents="true">
                    
                 </ext:DateField>
                 </Items>
                    </ext:FieldContainer>


                    <%-- Fecha entrega materiales--%>
                    
                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="Fecha Entrega Materiales" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout"> 
                <Items>
                    <ext:DateField 
                    ID="DFechaEntregaMat" 
                    runat="server" 
                    Vtype="daterange"
                    EndDateField="Fecha Entrega Materiales"
                    EnableKeyEvents="true">
                    
                 </ext:DateField>
                 </Items>
                    </ext:FieldContainer>
   
                    
                           

                </Items>






            </ext:FieldSet>

</Items>

         
                <Items>
             

              
           <ext:FieldSet 
                runat="server"
                Title="Registrar Asesores y Socios"
                Collapsible="false"
                DefaultAnchor="100%">

           <Items>

    <ext:TabPanel runat="server" ID="tabpanelcompos" Width="300" Height="420" disabled="true" AutoScroll="true" >
        <Items>
            
             
           
             
             <%--panel de asesores--%>

            <ext:Panel 
                runat="server" 
                Title="Asesores" 
                BodyPadding="6" AutoScroll="true">

                  <Items>  
             <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>
                            <ext:Button ID="Button1" runat="server" Text="Guardar" Icon="Add" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_Prod">
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                        </ext:Toolbar>

     </Items> 
               
               <Items>

                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false">                         
                    <Store>
                        <ext:Store ID="Store4" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="Identificacion" Type="Int" />
                                        <ext:ModelField Name="Nombre" Type="String" />
                                        <ext:ModelField Name="Tp_Doc" Type="String" />
                                        <ext:ModelField Name="Correo" Type="String" />
                                        <ext:ModelField Name="Celular" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" 
                                Text="Identificacion" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="ID" 
                                />
                            <ext:Column runat="server" 
                                Text="Nombre" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Tp_Doc" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:DateColumn runat="server" 
                                Text="Correo" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="Celular" 
                                Sortable="true" 
                                DataIndex="Name"
                                Flex="1" >
                                <Renderer Handler="return (value) ? 'Yes':'No';" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Displaying Jobs {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel>


                 </Items>

                  
              
            </ext:Panel>

            <%--panel de socios --%>
        <ext:Panel
                runat="server" 
                Title="Socios" 
                BodyPadding="6" AutoScroll="true">
             <Listeners>
                            <Activate Handler="#{DirectMethods}.ActivarPanelSocios();" />
                 </Listeners>
                <Content>
                 






                    <ext:FieldSet 
                runat="server"
                Title="Registrar Socios a la Unidad Productiva"
                Collapsible="true"
                DefaultAnchor="100%">




                 <Items>
 <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Identificacion"
                Layout="HBoxLayout" ID="FieldContainer1">
                  <Items>
                        <ext:NumberField   ID="Txt_Ident_Socio" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" ReadOnly="true"/>
                     
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true" ID="Toolbar2">   
                       
                        <Items>
                            <ext:Button ID="Btn_Reg_Socio" runat="server" Text="Asignar en Gisena" Icon="Add">
                                     <DirectEvents>
                                   <Click OnEvent="Registrar_Socios">
                                    </Click>
                                 </DirectEvents> 
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>
                  </ext:FieldContainer>

    </Items>




                     
   
                        
         <%--Boton Guardar Socios --%>
   

 <Items>
 
                    
                    <ext:GridPanel
                    runat="server" 
                    Header="false"
                    Border="false"
                        ID="GridAsesores">                         
                    <Store>
                        <ext:Store ID="StrlistaSocios" runat="server" PageSize="10">
                            <Model>
                                <ext:Model runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="Ident" Type="String" />
                                        <ext:ModelField Name="Nombre" Type="String" />
                                        <ext:ModelField Name="apellido" Type="String" />
                                        <ext:ModelField Name="tipodocumento" Type="String" />                                          
                                          <ext:ModelField Name="ficha" Type="String" />
                                         <ext:ModelField Name="tipoblacion" Type="String" />
                                        
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" 
                                Text="Ident" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Ident" 
                                />
                            <ext:Column runat="server" 
                                Text="Nombre" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="Nombre"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="Apellido" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="apellido"
                                Flex="1" 
                                />
                            <ext:Column runat="server" 
                                Text="tipodocumento" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="tipodocumento"
                                Flex="1" 
                                />
                            
                             <ext:Column runat="server" 
                                Text="ficha" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="ficha"
                                Flex="1" >
                                
                            </ext:Column>
                             <ext:Column runat="server" 
                                Text="tipoblacion" 
                                Width="40" 
                                Sortable="true" 
                                DataIndex="tipoblacion"
                                Flex="1" >
                                
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                           <SelectionModel>
                <ext:CellSelectionModel runat="server">
                    <DirectEvents>
                        <Select OnEvent="Cell_Click" />                        
                    </DirectEvents>
                </ext:CellSelectionModel>
            </SelectionModel>
                    <View>
                        <ext:GridView runat="server" LoadMask="false" />
                    </View>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:NumericFilter DataIndex="ID" />
                                <ext:StringFilter DataIndex="Name" />
                                <ext:DateFilter DataIndex="Start">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:DateFilter DataIndex="End">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>                        
                                <ext:BooleanFilter DataIndex="Completed" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar 
                            runat="server" 
                            DisplayInfo="true"
                            DisplayMsg="Displaying Jobs {0} - {1} of {2}"
                            />
                    </BottomBar>
                </ext:GridPanel>
                    
                     
              </Items>



                        </ext:FieldSet>

                </Content>
            </ext:Panel>
            
     
            
             </Items>
    

    </ext:TabPanel>
           
              </Items>  
               
                </ext:FieldSet>


                   </Items>
             


          
              
 </ext:FormPanel>

                 
         </Items>
          
        </ext:Window> 
     
     
     
     
     
           



</body>
</html>


</asp:Content>